package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SummaryMapper;
import com.ruoyi.system.domain.Summary;
import com.ruoyi.system.service.ISummaryService;

/**
 * 批卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class SummaryServiceImpl implements ISummaryService 
{
    @Autowired
    private SummaryMapper summaryMapper;

    /**
     * 查询批卷
     * 
     * @param id 批卷主键
     * @return 批卷
     */
    @Override
    public Summary selectSummaryById(Long id)
    {
        return summaryMapper.selectSummaryById(id);
    }

    /**
     * 查询批卷列表
     * 
     * @param summary 批卷
     * @return 批卷
     */
    @Override
    public List<Summary> selectSummaryList(Summary summary)
    {
        return summaryMapper.selectSummaryList(summary);
    }

    /**
     * 新增批卷
     * 
     * @param summary 批卷
     * @return 结果
     */
    @Override
    public int insertSummary(Summary summary)
    {
        summary.setCreateTime(DateUtils.getNowDate());
        return summaryMapper.insertSummary(summary);
    }

    /**
     * 修改批卷
     * 
     * @param summary 批卷
     * @return 结果
     */
    @Override
    public int updateSummary(Summary summary)
    {
        return summaryMapper.updateSummary(summary);
    }

    /**
     * 批量删除批卷
     * 
     * @param ids 需要删除的批卷主键
     * @return 结果
     */
    @Override
    public int deleteSummaryByIds(Long[] ids)
    {
        return summaryMapper.deleteSummaryByIds(ids);
    }

    /**
     * 删除批卷信息
     * 
     * @param id 批卷主键
     * @return 结果
     */
    @Override
    public int deleteSummaryById(Long id)
    {
        return summaryMapper.deleteSummaryById(id);
    }
}
